﻿<%@ Page Title="" Language="C#" MasterPageFile="~/DepartmentMaster.Master" AutoEventWireup="true"
    CodeBehind="Login.aspx.cs" Inherits="Department.Login" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<asp:Content ID="ContentHead" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="ContentMain" ContentPlaceHolderID="mainContentHolder" runat="server">
    <h2>
        Вход за регистрирани потребители</h2>
    <br />
    <asp:LoginView ID="LoginViewLogin" runat="server">
        <AnonymousTemplate>
            <asp:Login ID="LoginControl" runat="server" FailureText="Грешен потребител или парола!">
                <LayoutTemplate>
                    <asp:Panel ID="LoginPanel" runat="server" DefaultButton="LoginButton">
                        <table cellpadding="1" cellspacing="0" style="border-collapse: collapse;">
                            <tr>
                                <td>
                                    <table cellpadding="0">
                                        <tr>
                                            <td align="center" colspan="2">
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right">
                                                <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">Потребител:</asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="UserName" runat="server" TabIndex="1"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
                                                    ErrorMessage="Това поле е задължително!" ToolTip="Това поле е задължително."
                                                    ValidationGroup="LoginControl">*</asp:RequiredFieldValidator>
                                                <asp:RegularExpressionValidator ID="regExValidatorUserName" ControlToValidate="UserName"
                                                    ValidationExpression="[a-zA-Zа-яА-Я0-9._\s\S]{0,255}" runat="server" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="left">
                                                <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Парола:</asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="Password" runat="server" TextMode="Password" TabIndex="2"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
                                                    ErrorMessage="Това поле е задължително!" ToolTip="Това поле е задължително."
                                                    ValidationGroup="LoginControl">*</asp:RequiredFieldValidator>
                                                <asp:RegularExpressionValidator ID="regExValidatorPass" ControlToValidate="Password"
                                                    ValidationExpression="[a-zA-Zа-яА-Я0-9._\s\S]{0,127}" runat="server" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="left" colspan="2">
                                                <asp:CheckBox ID="RememberMe" runat="server" Text="Запомни ме." />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="left" colspan="2" style="color: Red;">
                                                <asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="left" colspan="2">
                                                <asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="Вход" ValidationGroup="LoginControl" />
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </asp:Panel>
                </LayoutTemplate>
            </asp:Login>
        </AnonymousTemplate>
    </asp:LoginView>

</asp:Content>
